Skip to content

Implement Black Lotus card#520

Draft
radar with Copilot wants to merge 5 commits into
masterfrom
copilot/implement-black-lotus-card
Draft

Implement Black Lotus card#520
radar with Copilot wants to merge 5 commits into
masterfrom
copilot/implement-black-lotus-card

Conversation

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

Implements Black Lotus, a zero-cost artifact with the activated ability: {T}, Sacrifice Black Lotus: Add three mana of any one color.

Implementation

  • Card definition (lib/magic/cards/black_lotus.rb): Uses Artifact builder DSL with a custom ManaAbility that:

    • Costs "{T}, Sacrifice {this}"
    • Provides all five color choices (:all)
    • Uses amount 3 to specify adding 3 mana
  • ManaAbility refactor (lib/magic/mana_ability.rb): Enhanced the base ManaAbility class to support configurable mana amounts:

    • Added amount class method to configure mana amount (defaults to 1)
    • Extracted validation logic into validate_choice! method
    • Updated resolve! to use validate_choice! and configurable amount
  • Tests (spec/cards/black_lotus_spec.rb): Verifies mana generation, sacrifice mechanic, and multi-color choices

class ManaAbility < Magic::ManaAbility
  costs "{T}, Sacrifice {this}"
  choices :all
  amount 3
end

The refactored ManaAbility class provides a clean DSL pattern for configuring mana amounts without code duplication, maintaining backward compatibility with existing cards.

Original prompt

Work on TODO: Implement Black Lotus (from lib/magic/cards/black_lotus.rb)

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 12, 2026 01:42
Co-authored-by: radar <2687+radar@users.noreply.github.com>
Co-authored-by: radar <2687+radar@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement Black Lotus card functionality Implement Black Lotus card Jan 12, 2026
Copilot AI requested a review from radar January 12, 2026 01:46
fz-ryanbigg

This comment was marked as off-topic.

@radar radar left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot add 3 mana in the card's ability, not two. Do not assume original ability will always add a mana.

Co-authored-by: radar <2687+radar@users.noreply.github.com>

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot add 3 mana in the card's ability, not two. Do not assume original ability will always add a mana.

Fixed in 850187a. The resolve! method now directly adds 3 mana without calling super or assuming the parent will add any mana.

Copilot AI requested a review from radar January 12, 2026 02:12

@radar radar left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do this without copying the logic in ManaAbility? You can change ManaAbility if you need to.

…ng validation logic

Co-authored-by: radar <2687+radar@users.noreply.github.com>

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

Can you do this without copying the logic in ManaAbility? You can change ManaAbility if you need to.

Fixed in b4b7205. I refactored ManaAbility to add:

  • amount class method to configure mana amount (defaults to 1)
  • validate_choice! method to extract validation logic

Black Lotus now uses amount 3 without duplicating any logic.

Copilot AI requested a review from radar January 12, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants